<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"
%><%@ page import="com.mig.coins.html.CommonHTML"
%><%@ page import="com.mig.coins.domain.GestionContable"
%><%@ page import="com.mig.coins.domain.Common"
%><%@ page import="com.mig.coins.domain.MySessionData"
%><%
	long idApunte = 0;
	if (null != request.getParameter("id"))
		idApunte = Long.parseLong((String)request.getParameter("id"));

	String title=null;
	if (idApunte > 0) 
		title = "Modificación Apunte";
	else
		title = "Nuevo Apunte";
	// Datos de la sesion
	String path = request.getContextPath();
	MySessionData ses = new MySessionData(request);
	long idSocio = ses.getIdSocioGestion();

	String[] js = {"monedas.js", 
			"ajaxRequest.js",
			"calendar.js",
			"contabilidad.js"};
	
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%=Common.buildHead(title + " (Socio)", path, js) %>
<body onload="inicializaDatos('<%=path%>', <%=idApunte%>)">
	<script type="text/javascript">
		window.onbeforeunload = function() {
			if (somethingHasChanged()) { 
				return '¿Quiere perder los datos introducidos?';
			}
		}
	</script>

<%=Common.buildMenu(Common.MENU_CONTABILIDAD, path, ses) %>
		<div id="wrapper">
			<div id="page">
				<div id="content">
					<%=GestionContable.mttoApunte(idApunte, idSocio, path) %>
				</div><!-- content --> 

<%=GestionContable.buildMenu(GestionContable.MENU_NINGUNA_OPCION, idSocio, path)%>

				<div style="clear: both;">&nbsp;</div>
			</div> <!-- Page -->
		</div> <!-- wrapper -->
		<%=CommonHTML.buildFooter() %>
	</body>
</html>
